<template>
	<div class="app">
		<h2>我是App组件</h2>
		<h4>我的子组件Child给我的msg是：{{msg}}</h4>
		<h4>我的子组件Child给我的address是：{{address}}</h4>
		<Child @haha="test" @xixi="demo"/>
	</div>
</template>

<script>
	import Child from './components/Child'

	export default {
		name:'App',
		components:{Child},
		data() {
			return {
				msg:'',
				address:''
			}
		},
		methods: {
			test(value){
				console.log('App里的test函数被调用了',value)
				this.msg = value
			},
			demo(value){
				console.log('App里的demo函数被调用了',value)
				this.address = value
			}
		}
	}
</script>

<style>
	.app{
		background-color: gray;
		padding: 30px;
	}
</style>